<%-- 
    Document   : rekapBorang
    Created on : Oct 23, 2012, 8:42:23 PM
    Author     : mr2
--%>
<script>
function validateRekapBorang(){
    if (document.rekapBorang.periodeRekapAwal.value == "0"){
        alert("periode awal harus diiisi");
        document.rekapBorang.periodeRekapAwal.focus();
        return false;
    }else if (document.rekapBorang.periodeRekapAkhir.value == "0"){
        alert("periode akhir harus diisi");
        document.rekapBorang.periodeRekapAkhir.focus();
        return false;
    }else if (document.rekapBorang.formatTampilan.value == "0"){
        alert("Format harus diisi");
        document.rekapBorang.formatTampilan.focus();
        return false;
    }else if (document.rekapBorang.periodeRekapAwal.value != "0" && document.rekapBorang.periodeRekapAkhir.value != "0"){
        if(document.rekapBorang.periodeRekapAkhir.value < document.rekapBorang.periodeRekapAwal.value){
            alert("periode awal harus lebih kecil dari periode akhir");
            return false;
        } 
    }
}
</script>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="id-form">
    <form name="rekapBorang" id="mainform" action="SidangTAController?page=rekapBimbinganTA" onSubmit="return validateRekapBorang()" method="post">		
        <tr>
            <input name="laporan" value="${laporan}" type="hidden" />
            <th width="38" valign="top">Rentang periode</th>
            <td width="34" align="center" valign="middle">:</td>
            <td width="220">
                <select name="periodeRekapAwal" class="styledselect_form_1">
                <option value="0">-- PILIH PERIODE --</option>
                <c:forEach items="${periodeYudisium}" var="periodeYudisium">
                <option value="${periodeYudisium.tglMulai}"<c:if test="${periodeYudisium.tglMulai == periodeRekapAwal}">selected="selected"</c:if>>${periodeYudisium.periode}
                </option>
                </c:forEach>
                </select>
            </td>
            <td width="34">s.d</td>
            <td width="220">
                <select name="periodeRekapAkhir" class="styledselect_form_1">
                <option value="0">-- PILIH PERIODE --</option>
                <c:forEach items="${periodeYudisium}" var="periodeYudisium">
                <option value="${periodeYudisium.tglAkhir}"<c:if test="${periodeYudisium.tglAkhir == periodeRekapAkhir}">selected="selected"</c:if>>${periodeYudisium.periode}
                </option>
                </c:forEach>
                </select>
            </td>
            <td></td>
            <th valign="top">Format</th>
            <td width="34" align="center" valign="middle">:</td>
            <td ><select name="formatTampilan" class="styledselect_form_1">
            <option value="0">-- PILIH FOMAT LAPORAN --</option>
            <option value="HTML" <c:if test="${formatTampilan == 'HTML'}" >selected="selected"</c:if> >HTML</option>
            <option value="EXCEL" <c:if test="${formatTampilan == 'EXCEL'}" >selected="selected"</c:if>>EXCEL</option>
            </select></td>
            <td valign="top"><input value="" class="form-tampilkan" type="submit" /></td>
        </tr>
    </form>
</table>

    <!--  start product-table ..................................................................................... -->
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
<tr>
    <div class="form_description">
    <h2 align="center">Rekapitulasi Pembimbingan Tugas Akhir</h2>
    <p></p>					
    </div>
</tr>
<tr>
    <th width="56" class="table-header-repeat line-left minwidth-1">No</th>
    <th width="290" class="table-header-repeat line-left minwidth-1"><a href="">Item Rekap</a></th>
    <th width="173" class="table-header-repeat line-left minwidth-1"><a href="">Hasil</a></th>
</tr>
<tr>
    <td align="center">1</td>
    <td>Rata - Rata Jumlah Mahasiswa per dosen pembimbing</td>
    <td><b>${RataJlhMhsPerDosen}</b> Mahasiswa/Dosen Pembimbing</td>
</tr>
<tr>
    <td align="center">2</td>
    <td>Rata - Rata Jumlah Pertermuan Dosen - Mahasiswa</td>
    <td><b>${RataPertemuan}</b> pertemuan</td>
</tr>
<tr>
    <td align="center">3</td>
    <td>Rata - Rata Lama Penyelesaian tugas Akhir</td>
    <td><b>${RataLamaTA}</b> Bulan</td>
</tr>
</table>



<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
<tr>
    <div class="form_description">
    <h2 align="center">Rekap Jumlah bimbingan dosen</h2>
    <p></p>					
    </div>
</tr>
<% int i = 1; %>
<tr>
    <th width="56" class="table-header-repeat line-left minwidth-1"><a href="">No</a></th>
    <th width="290" class="table-header-repeat line-left minwidth-1"><a href="">Nama Dosen</a></th>
    <th width="173" class="table-header-repeat line-left minwidth-1"><a href="">Jumlah Bimingan</a></th> 
</tr>
<c:forEach items="${listMhsBimbingan}" var="listMhsBimbingan">
<tr>                                    
    <td align="center"><% out.print(i); i++;%></td>
    <td>
        <c:forEach items="${namaDosen}" var="namaDosen">
        <c:if test="${(namaDosen.user.idUser == listMhsBimbingan.idUser)}">    
        ${namaDosen.user.namaUser}
        </c:if>
        </c:forEach>
    </td>
    <td align="center">${listMhsBimbingan.jlhBimbingan} Mahasiswa</td>                                   
</tr>
</c:forEach>
</table>
